package lol.clann.bukkit.pluginboot.newcommand;

import lol.clann.clannboot.command.api.ICommandSender;
import org.bukkit.command.CommandSender;

/**
 * @author pyz
 * @date 2018/11/27 9:38 PM
 */
public class BukkitCommandSender implements ICommandSender<CommandSender> {
    private final CommandSender sender;

    public BukkitCommandSender(CommandSender sender) {
        this.sender = sender;
    }

    @Override
    public void sendMessage(String msg) {
        sender.sendMessage(msg);
    }

    @Override
    public boolean hasPermission(String permission) {
        return sender.hasPermission(permission);
    }

    @Override
    public String getName() {
        return sender.getName();
    }

    @Override
    public CommandSender getSender() {
        return sender;
    }

    @Override
    public boolean isOp() {
        return sender.isOp();
    }
}
